package com.icinfo.cloud.provider.punish.common.datareport.controller;

import com.icinfo.cloud.provider.punish.common.datareport.dto.CaseAdditionalDataReportDto;
import com.icinfo.cloud.provider.punish.common.datareport.service.ICaseAdditionalDataReportService;
import com.icinfo.framework.common.web.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @Desc 描述
 * @Author mahan
 * @Date 2022/12/20
 */
@RestController
@RequestMapping("/punish/additional/datareport")
public class CaseAdditionalDataReportController {


	@Resource
	private ICaseAdditionalDataReportService caseAdditionalDataReportService;


	/**
	 * 传入补录表ID，上传
	 * @param dto
	 * @return
	 */
	@PostMapping("/reportByIds")
	public Result<String> reportByIds(@RequestBody CaseAdditionalDataReportDto dto) {
		String re = caseAdditionalDataReportService.caseAdditionalDataReportByIds(dto);
		return Result.success(re);
	}

	/**
	 * 查询审批状态2和5的数据，全部上报
	 * @return
	 */
	@PostMapping("/reportByCaseStatus")
	public Result<String> reportByCaseStatus(@RequestBody CaseAdditionalDataReportDto dto) {
		caseAdditionalDataReportService.reportByCaseStatus(dto);
		return Result.success("请求成功");
	}

}
